let Main = () => import("@/views/Main.vue")

export default [
    // ---首页---
    {
        path: "home",
        name: "home",
        component: () => import("@/views/Home.vue"),
        meta: {
            title: "home",
            icon: "icon-shouye",
        }
    },

    // ---营销管理---
    {
        path: "yunyinmanage",
        name: "yunyinmanage",
        component: Main,
        meta: {
            title: "yunyin.yunyinmanage",
            icon: "icon-yunying",
        },
        children: [
            {
                path: "order",
                name: "ordermanage",
                component: () => import("@/views/yunyinmanage/Order.vue"),      //订单管理
                meta: {
                    title: "yunyin.ordermanage"
                },
            },
            {
                path: "comment",
                name: "commentmanage",
                component: () => import("@/views/yunyinmanage/Comment.vue"),      //评论管理
                meta: {
                    title: "yunyin.commentmanage"
                },
            },
            {
                path: "yunfei",
                name: "yunfeimanage",
                component: () => import("@/views/yunyinmanage/Yunfei.vue"),      //运费管理
                meta: {
                    title: "yunyin.yunfeimanage"
                },
            }

        ]
    },

    // ---商品管理---
    {
        path: "productmanage",
        name: "productmanage",
        component: Main,
        meta: {
            title: "product.productmanage",
            icon: "icon-shangpin",
        },
        children: [
            {
                path: "productlist",
                name: "productlistmanage",
                component: () => import("@/views/productmanage/ProductList.vue"),      //商品列表
                meta: {
                    title: "product.productlistmanage"
                },
            },
            {
                path: "creat",
                name: "productCreate",
                component: () => import("@/views/productmanage/productCreate.vue"),      //商品创建
                meta: {
                    title: "product.create",
                    hidden:true         //不显示在左边菜单
                },
            },
            {
                path: "edit/:id",
                name: "productEdit",
                props:true,
                component: () => import("@/views/productmanage/productEdit.vue"),      //商品编辑
                meta: {
                    title: "product.edit",
                    hidden:true
                },
            },
            {
                path: "tuangou",
                name: "tuangoumanage",
                component: () => import("@/views/productmanage/TuanGou.vue"),      //团购商品
                meta: {
                    title: "product.tuangoumanage"
                },
            },
            {
                path: "category",
                name: "categorymanage",
                component: () => import("@/views/productmanage/CategoryManage.vue"),      //类目管理
                meta: {
                    title: "product.categorymanage"
                },
            }

        ]
    },

    // ---推广管理---
    {
        path: "tuiguanmanage",
        name: "tuiguanmanage",
        component: Main,
        meta: {
            title: "tuiguan.tuiguanmanage",
            icon: "icon-yingxiaotuiguang",
        },
        children: [
            {
                path: "guangao",
                name: "guangaomanage",
                component: () => import("@/views/tuiguanmanage/GuanGao.vue"),      //广告管理
                meta: {
                    title: "tuiguan.guangaomanage"
                },
            },
            {
                path: "youhuiquan",
                name: "youhuiquanmanage",
                component: () => import("@/views/tuiguanmanage/YouHuiQuan.vue"),      //优惠券管理
                meta: {
                    title: "tuiguan.youhuiquanmanage"
                },
            }

        ]
    },

    // ---用户管理---
    {
        path: "usermanage",
        name: "usermanage",
        component: Main,
        meta: {
            title: "user.usermanage",
            icon: "icon-jurassic_user",
        },
        children: [
            {
                path: "huiyuan",
                name: "huiyuanmanage",
                component: () => import("@/views/usermanage/HuiYuan.vue"),      //会员管理
                meta: {
                    title: "user.huiyuanmanage"
                },
            },
            {
                path: "addr",
                name: "addrmanage",
                component: () => import("@/views/usermanage/Addrmanage.vue"),      //地址管理
                meta: {
                    title: "user.addrmanage"
                },
            }

        ]
    },

    // ---系统管理---
    {
        path: "systemmanage",
        name: "systemmanage",
        component: Main,
        meta: {
            title: "system.systemmanage",
            icon: "icon-shezhi",
        },
        children: [
            {
                path: "setting",
                name: "settingmanage",
                component: () => import("@/views/systemmanage/Setting.vue"),      //系统配置
                meta: {
                    title: "system.settingmanage"
                },
            },
            {
                path: "adminuser",
                name: "adminusermanage",
                component: () => import("@/views/systemmanage/AdminUser.vue"),      //管理员
                meta: {
                    title: "system.adminusermanage"
                },
            },
            {
                path: "operatelog",
                name: "operatelogmanage",
                component: () => import("@/views/systemmanage/OperateLog.vue"),      //操作日志
                meta: {
                    title: "system.operatelogmanage"
                },
            },
            {
                path: "role",
                name: "rolemanage",
                component: () => import("@/views/systemmanage/RoleManage.vue"),      //角色管理
                meta: {
                    title: "system.rolemanage"
                },
            }

        ]
    },
]